cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

find_package(LibSeawifs REQUIRED)
include_directories(${LibSeawifs_INCLUDE_DIRS})
set(LIBS ${LibSeawifs_LIBRARIES})

find_package(LibDfutils REQUIRED)
include_directories(${LibDfutils_INCLUDE_DIRS})
list(APPEND LIBS ${LibDfutils_LIBRARIES})

ADD_LIBRARY(l2
  readL2scan.c
  setupflags.c
  get_product_table.c
)

target_link_libraries(l2 ${LIBS})

install (TARGETS l2 DESTINATION lib)
